#include "stdafx.h"
#include "YSystemFactory.h"
#include "YThread.h"
#include "YProactor.h"
#include "YStream.h"

namespace ysimple_system
{
	YSystemFactory::YSystemFactory(void)
	{
	}


	YSystemFactory::~YSystemFactory(void)
	{
	}

	STREAM_SPTR YSystemFactory::createStream()
	{
		return STREAM_SPTR(
			new YStream,
			[](IStream* ptr)
		{
			ptr->release();
		}
		);
	}

	THREAD_SPTR YSystemFactory::createThread()
	{
		return THREAD_SPTR(
			new YThread,
			[](IThread* ptr)
			{
				ptr->release();
			}
		);
	}

	PROACTOR_SPTR YSystemFactory::createProactor()
	{
		return PROACTOR_SPTR(new YProactor, 
			[](IProactor* ptr)
			{
				ptr->release();
			}
		);
	}

}

